#! /usr/bin/env perl
use base Scanner;
use strict vars;
use warnings;

# @name: static-scanner.pl
# @version: beta
# @creator: Iago Sousa Rodrigues - [574T1C-B1T]
# @released: 14, Jul 2011

if (!$ARGV[0])
{
  &Exception::Show(Exception::NO_PARAM);
}

if ($ARGV[0] eq '--help')
{
  &Scanner::ShowLogo;
  &Exception::Show(Exception::HELP);
}

my $i = 0;
my $web = 'http://www.google.com.br';
my $outfile;

foreach ($i..$#ARGV)
{
  $web = (($ARGV[$i] eq '-d') || ($ARGV[$i] eq '--dork')) ? $ARGV[$i+1] : $web;
  $web = (($ARGV[$i] eq '-w') || ($ARGV[$i] eq '--website')) ? $ARGV[$i+1] : $web;
  $outfile = (($ARGV[$i] eq '-o') || ($ARGV[$i] eq '--outfile')) ? $ARGV[$i+1] : undef;
}

if ($web)
{
  &Scanner::CheckSqlVulnerability($web);
}
exit;